From: Richard M. Stallman Date: Fri, 29 Aug 2003 16:14:26 +0000 (+0000) Subject: (Fexpand_abbrev): Insert before deleting. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~25681 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=cc55c6fe79bf619c25bece59b4ee2cabb9f116e6;p=emacs.git (Fexpand_abbrev): Insert before deleting. --- diff --git a/src/abbrev.c b/src/abbrev.c index dabc03b2a55..f6253f06ded 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -356,10 +356,13 @@ Returns the abbrev symbol, if expansion took place. */) { SET_PT (wordstart); - del_range_both (wordstart, wordstart_byte, wordend, wordend_byte, 1); - insert_from_string (expansion, 0, 0, SCHARS (expansion), SBYTES (expansion), 1); + del_range_both (PT, PT_BYTE, + wordend + (PT - wordstart), + wordend_byte + (PT_BYTE - wordstart_byte), + 1); + SET_PT (PT + whitecnt); if (uccount && !lccount)